﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VPNAccountsList.ascx.cs"
    Inherits="VPNNew.UserContorls.VPNAccountsList" %>
<scc:GridView ID="gvVPN" runat="server">
    <Columns>
        <asp:TemplateField HeaderText="[[AccountName]]" ItemStyle-HorizontalAlign="Left">
            <ItemTemplate>
                <div>
                    <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("AccountName") %>'></asp:Literal>
                </div>
                <div>
                    <vnc:QuotaBar ID="QuotaBar1" runat="server" Total='<%#Eval("Quota") %>' Used='<%#Eval("Used") %>' />
                </div>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
        </asp:TemplateField>
        <asp:BoundField DataField="ExpireDate" HeaderText="[[ExpireDate]]" DataFormatString="{0:yyyy-MM-dd}"
            ItemStyle-Width="80px"></asp:BoundField>
        <asp:TemplateField HeaderText="[[Status]]" ItemStyle-Width="70px">
            <ItemTemplate>
                <asp:Literal ID="Literal1" runat="server" Text='<%# string.Format("[[{0}]]", Enum.GetName(typeof(VPN.Manage.AccountStatus), Eval("Status"))) %>'></asp:Literal>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Type" HeaderText="[[Type]]" DataFormatString="{0}" ItemStyle-Width="40px">
        </asp:BoundField>
        <asp:TemplateField ItemStyle-Width="40px">
            <ItemTemplate>
                <div class="payIcons">
                    <asp:HyperLink runat="server" ID="pay" ImageUrl="~/images/pay.png" NavigateUrl='<%#Eval("AccountID","~/RenewPO.aspx?AID={0}") %>'
                        ToolTip="[[Pay]]" />
                    <asp:HyperLink runat="server" ImageUrl="~/images/password.png" NavigateUrl='<%#Eval("AccountID","~/ResetVPNPassword.aspx?AID={0}") %>'
                        ToolTip="[[ResetPassword]]" />
                </div>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</scc:GridView>
